package com.hutianao.gqgl.menu.respository;

import com.hutianao.gqgl.mybatis.entity.PtMenuEntity;
import com.hutianao.gqgl.mybatis.ztree.ZtreeEntity;
import com.hutianao.gqgl.spring.tag.entity.DictTagEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.entity.PtMenuI18n;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MenuDao {
    List<ZtreeEntity> queryLeftTree();
    PtMenuEntity queryMenuListById(@Param("menuId") String menuId);
    List<DictTagEntity> queryMenuList();
    List<PtMenuEntity> queryMenuInfoListPaddingById(@Param("menuId")String menuId,@Param("padding") PaddingEntity padding);

    Integer queryMenuInfoListTotal(@Param("menuId")String menuId);

    List<PtMenuI18n> getI18nByMenuId(@Param("menuId")String menuId);

    void deleteMenuI18nById(@Param("menuId")String menuId,@Param("langId") String langId);

    void insertMenuI18n(@Param("entity") PtMenuI18n ptMenuI18n);

    List<PtMenuI18n> queryMenuI18n(@Param("entity")PtMenuI18n ptMenuI18n);

    void updateMenuI18n(@Param("entity")PtMenuI18n ptMenuI18n);

    List<ZtreeEntity> queryBoundMenuTree();

    String queryParentId(@Param("menuId") String menuId);

    void saveParentIdByMenuId(@Param("menuId")String menuId,@Param("parentId") String parentId);

    void addMenuInfo(PtMenuEntity ptMenuEntity);

    void updateMenuInfo(PtMenuEntity ptMenuEntity);

    void deleteMenuInfoByMenuId(@Param("menuId") String menuId);
}